package com.wealth.scsj.p_app.view.fragment;


import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.wealth.scsj.p_app.R;
import com.wealth.scsj.p_app.adapter.TotalOrderAdapter;
import com.wealth.scsj.p_app.bean.TotalOrderBean;

import java.util.ArrayList;
import java.util.List;

/**
 * 已取消
 */
public class CancelFragment extends BaseFragment {

    private RecyclerView total_rv;
    private List<TotalOrderBean> totalOrderBeanList;
    private TotalOrderAdapter adapter;

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View inflate = inflater.inflate(R.layout.fragment_cancel, null);
        initView(inflate, null);
        initData();
        return inflate;
    }

    @Override
    protected void initView(View view, Bundle savedInstanceState) {
        total_rv = view.findViewById(R.id.total_rv);
        total_rv.setLayoutManager(new LinearLayoutManager(getHoldingActivity()));
    }

    @Override
    protected void initListener() {

    }

    @Override
    protected void initData() {
        totalOrderBeanList = new ArrayList<>();
        for (int i = 0; i < 6; i++) {
            totalOrderBeanList.add(new TotalOrderBean("fsff", "ffff", "ffff", "ffff", "ffff", "ffff"));

        }
        adapter = new TotalOrderAdapter(totalOrderBeanList);
        total_rv.setAdapter(adapter);
    }

    @Override
    protected int getLayoutId() {
        return 0;
    }

}
